﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyWeb.Business;
using MyWeb.Common;

namespace MyWeb.Module.Product
{
    public partial class DetailGroup : System.Web.UI.Page
    {
        string Id = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.RouteData.Values["Id"]!=null)
            {
                Id = Page.RouteData.Values["Id"].ToString();
            }
            if (!IsPostBack)
            {      
                lsvnhom.DataSource = ProductService.Product_GetMenu(Id, "", "100");
                lsvnhom.DataBind();
            }
        }
        protected string Url(string GrId, string Id, string Name)
        {
            return "/Pro/" + GrId + "/" + Id + "/" + StringClass.NameToTag(Name) + ".aspx";
        }
        protected string Formatmoney(string money)
        {
            string tien = "";
            try
            {
                tien = "" + Double.Parse(money).ToString("#,000") + " VNĐ";
            }
            catch
            {
                return tien = "";
            }
            return tien;
        }

   
    }
}